package com.zj.HJ;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class HJ74 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String num = sc.nextLine();
        List<String> res = getRes(num);
        System.out.println(res.size() - 1);
        for (String str : res) {
            System.out.println(str);
        }
    }

    public static List<String> getRes(String input) {
        List<String> res = new ArrayList<>();
        String[] splits = input.split(" ");
        StringBuilder param = new StringBuilder();
        boolean start = false;
        for (String str : splits) {
            if (!start && str.startsWith("\"")) {
                start = true;
                if (str.endsWith("\"")) {
                    start = false;
                    res.add(str.replace("\"", ""));
                } else {
                    param.append(str.replace("\"", ""));
                }
            } else if (start && str.endsWith("\"")) {
                param.append(" ").append(str.replace("\"", ""));
                res.add(param.toString());
                start = false;
            } else if (start) {
                param.append(" ").append(str);
            } else if (str.length() > 0) {
                res.add(str);
            }
        }
        return res;
    }


}
